// 云函数入口文件
const cloud = require('wx-server-sdk')

cloud.init()

// 云函数入口函数
exports.main = async (event, context) => {
  const wxContext = cloud.getWXContext()
  const db=cloud.database()
  return db.collection('dn').add({
   data:{
    orderid: event.orderid,
    name: event.name,
    room: event.room,
    telphone: event.telphone,
    Openid: event.Openid,
    createtime: event.createtime,
    address: event.address,
    pay: event.pay,
    beizhu: event.beizhu,
    small: event.small,
    middle: event.middle,
    images: event.images,
    money: event.money,
  state:event.state
   }


  })
}